package com.relax.controller;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author: pqs
 * @create: 2025-04-16 15:41:36
 **/
@Data
public class DpScanResponseDTO implements Serializable {
    private Boolean result;
    private ScanResult data;


    @Data
    public static class ScanResult{
        private List<Host> hosts;
        private List<Vul> vul;
    }



    @Data
    public static class Host {
        //操作系统
        private String OS;

        //设备类型（主机设备、其他设备、物联⽹设备）
        private String asset_type;

        //设备型号
        private String device_model;

        //⼚商
        private String firm;

        //超危漏洞数量
        private Integer critical;

        //⾼危漏洞数量
        private Integer high;
        private String ip;

        //资产⻛险等级 (取值:超危、⾼危、中危、低危、⽐较安全）
        private String level;

        // 信息类漏洞数量
        private Integer info;

        //低危漏洞数量
        private Integer low;
        private String mac;

        //中危漏洞数量
        private Integer middle;
        //   private String port;
        //   private String proto;

        //资产⻛险评分
        private Integer score;

        //序列号
        private String serial_num;
        //  private String service;

        //服务列表
        private List<Service> serviceList;

        ///资产软件版本
        private String software;
    }

    @Data
    public static class Service {
        private Integer port;

        //服务 eg:snapenetio
        private String service;

        //协议 eg:tcp
        private String proto;
    }

    @Data
    public static class Vul {
        //cncve号
        private String cncve;

        //cnnvd号
        private String cnnvd;

        //cnvd号
        private String cnvd;

        //cnvd号
        private String cve;

        //cvss分值
        private String cvss_score;

        private String engine;

        //第⼀类型（主机漏洞，模拟⼈⼯漏洞、WEB漏洞、弱⼝令漏洞 枚举：host、ipc、web、weak）
        private String first_type;
        private String ip;

        //⻛险等级(超危-S、⾼-H、中-M、低-L、信息类-I)
        private String level;

        //有效验证链接
        private String link;

        //端⼝
        private String port;

        //第⼆类型
        private String second_type;

        //服务分类
        private String service_category;

        //漏洞描述
        private String vul_desc;

        //漏洞ID
        private String vul_id;

        //漏洞名
        private String vul_name;

        //验证链接
        private String vul_result;

        //漏洞解决⽅案
        private String vul_solution;

        //请求信息
        private String request;

        //响应信息
        private String response;
    }

}




